insheet using "lm_merge_week_0302_manual_threshold.csv", clear

numdate w yw=week_num, p(YW)
//gen yw = weekly(group1,"YW")
format yw %tw
tsset yw
format yw %tw

**# Table 5  #
reg d.stringencyindex_average L(1).stringencyindex_average L(1).newcasesper100000 d.newcasesper100000 L(1).newdeathsper100000 d.newdeathsper100000 L(1).newvaccinedosesper100  d.newvaccinedosesper100 L(1).vaccinedosesper100 d.vaccinedosesper100  L(1).faremenzhen_all_index d.faremenzhen_all_index    
est store baseline_model


reg d.stringencyindex_average L(1).stringencyindex_average L(1).newcasesper100000 d.newcasesper100000 L(1).newdeathsper100000 d.newdeathsper100000 L(1).newvaccinedosesper100  d.newvaccinedosesper100 L(1).vaccinedosesper100 d.vaccinedosesper100  L(1).faremenzhen_all_index d.faremenzhen_all_index   L(1).ideology d.ideology
est store ideology

reg d.stringencyindex_average L(1).stringencyindex_average   L(1).newcasesper100000 d.newcasesper100000 L(1).newdeathsper100000 d.newdeathsper100000 L(1).newvaccinedosesper100  d.newvaccinedosesper100 L(1).vaccinedosesper100 d.vaccinedosesper100  L(1).faremenzhen_all_index d.faremenzhen_all_index L(1).imperative d.imperative 
est store imperative

reg d.stringencyindex_average L(1).stringencyindex_average  L(1).newcasesper100000 d.newcasesper100000 L(1).newdeathsper100000 d.newdeathsper100000 L(1).newvaccinedosesper100  d.newvaccinedosesper100 L(1).vaccinedosesper100 d.vaccinedosesper100  L(1).faremenzhen_all_index d.faremenzhen_all_index L(1).directive d.directive
est store directive


reg d.stringencyindex_average L(1).stringencyindex_average  L(1).newcasesper100000 d.newcasesper100000 L(1).newdeathsper100000 d.newdeathsper100000 L(1).newvaccinedosesper100  d.newvaccinedosesper100 L(1).vaccinedosesper100 d.vaccinedosesper100 L(1).faremenzhen_all_index d.faremenzhen_all_index L(1).communicative d.communicative
est store communicative


reg d.stringencyindex_average L(1).stringencyindex_average L(1).newcasesper100000 d.newcasesper100000 L(1).newdeathsper100000 d.newdeathsper100000 L(1).newvaccinedosesper100  d.newvaccinedosesper100 L(1).vaccinedosesper100 d.vaccinedosesper100 L(1).faremenzhen_all_index d.faremenzhen_all_index  L(1).ideology d.ideology L(1).imperative d.imperative  L(1).directive d.directive L(1).communicative d.communicative
est store all 

esttab  baseline_model ideology imperative directive  communicative all using "table5.rtf",mtitle(baseline_model  ideology imperative directive  communicative all) compress  nogap b (%6.3f) scalars (r2 r2_a N F) star (* 0.1 ** 0.05 *** 0.01) p replace


**# Table 6 #
reg d.stringencyindex_east L(1).stringencyindex_east L(1).new_cases_east d.new_cases_east L(1).new_deaths_east d.new_deaths_east  L(1).ideology d.ideology L(1).imperative d.imperative  L(1).directive d.directive L(1).communicative d.communicative 		
est store east
reg d.stringencyindex_central L(1).stringencyindex_central L(1).new_cases_central d.new_cases_central L(1).new_deaths_central d.new_deaths_central L(1).ideology d.ideology L(1).imperative d.imperative  L(1).directive d.directive L(1).communicative d.communicative
est store central 

reg d.stringencyindex_west L(1).stringencyindex_west L(1).new_cases_west d.new_cases_west L(1).new_deaths_west d.new_deaths_west L(1).ideology d.ideology L(1).imperative d.imperative  L(1).directive d.directive L(1).communicative d.communicative
est store west 
 
reg d.stringencyindex_northeast L(1).stringencyindex_northeast L(1).new_cases_northeast d.new_cases_northeast L(1).new_deaths_northeast  L(1).ideology d.ideology L(1).imperative d.imperative  L(1).directive d.directive L(1).communicative d.communicative 
est store northeast 


esttab  east central west northeast using "table6.rtf",mtitle( east central west northeast ) compress  nogap b (%6.3f) scalars (r2 r2_a N F) star (* 0.1 ** 0.05 *** 0.01) p replace


